package org.springblade.modules.repair.vo.plan;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author zcc
 * @version 1.0
 * @date 2022/1/4 14:42
 */
@ApiModel("项目保养信息统计model")
@Data
public class PlanContentOfBuildingVo implements Comparable<PlanContentOfBuildingVo> {

	@ApiModelProperty("已排期项目,未排期项目")
	private String typeName;

	@ApiModelProperty("类型数量")
	private Integer typeCounts;

	@ApiModelProperty("电梯数量")
	private Integer elevatorCounts;

	@ApiModelProperty("电梯所有数量")
	private Integer elevatorCountsAll;

	@ApiModelProperty("项目名称")
	private String buildingName;

	@ApiModelProperty("平均占比")
	private BigDecimal avgRatio;

	@ApiModelProperty("项目电梯数量")
	private Integer elevatorOfBuildCounts;

	@Override
	public int compareTo(PlanContentOfBuildingVo o) {
		if (this.avgRatio.compareTo(o.getAvgRatio())>0){
			return -1;
		}else if (this.avgRatio.compareTo(o.getAvgRatio())==0){
			return 0;
		}
		return 1;
	}
}
